#include<iostream>
using namespace std;
struct point{
    int x;
    int y;
};
point a[10000];
bool cmp(point x1,point x2){
    return x1.x<x2.x;
}
bool cmp2(point x1,point x2){
    return x1.y<x2.y;
}
int main(){
    int l,w;
    cin>>l>>w;
    int n;
    cin>>n;
    n+=4;
    a[1].x=0;
    a[1].y=0;
    a[2].x=0;
    a[2].y=w;
    a[3].x=l;
    a[3].y=0;
    a[4].x=l;
    a[4].y=w;
    for(int i=5;i<=n;i++){
        cin>>a[i].x>>a[i].y;
    }
    sort(a+1,a+1+n,cmp);
    int ans=-1;
    for(int i=1;i<=n;i++){
        int down=w;
        int up=0;
       for(int j=i+1;j<=n;j++){
        ans=max(ans,(down-up)*(a[j].x-a[i].x));
        if(a[j].y>=a[i].y)down=min(down,a[j].y);
        else up=max(up,a[j].y);
       }
    } 
     sort(a+1,a+1+n,cmp2);
     for(int i=1;i<=n;i++){
        int lf=0;
        int r=l;
       for(int j=i+1;j<=n;j++){
        ans=max(ans,(r-lf)*(a[j].y-a[i].y));
        if(a[j].x>=a[i].x)r=min(r,a[j].x);
        else lf=max(lf,a[j].x);
       }
    }
    cout<<ans;
    return 0;
}